<!--
 * @Description: 注册成功页面
 * @Author: Kerwin
 * @Date: 2024-08-29 16:15:05
 * @LastEditTime: 2025-11-25 13:48:36
 * @LastEditors:  Please set LastEditors
-->
<template>
  <view class="content">
    <text class="iconfont hy-icon-paySuccess"></text>
    <text class="tit">注册成功</text>

    <view class="btn-group">
      <u-button @click="handleClick" type="success" plain>返回首页</u-button>
      <!-- <u-button
        type="success"
        open-type="launchApp"
        app-parameter="wechat"
        binderror="launchAppError"
        :custom-style="{
          marginTop: '40rpx'
        }"
        >打开APP</u-button
      > -->
      <!-- #ifdef H5 -->
      <u-button @click="toDownload" type="success">下载APP</u-button>
      <!-- #endif -->
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { onLoad, onShow, onUnload } from '@dcloudio/uni-app'
const shopMode = ref()
onLoad((option: any) => {
  console.log('注册成功Option', option)
  shopMode.value = option.mode
})

function handleClick() {
  uni.switchTab({
    url: '/pages/index/index'
  })
}
function toDownload() {
  window.open(
    `https://www.blacksilverscore.com/download/index2.html?mode=${shopMode.value}`
  )
}
</script>

<style lang="scss" scoped>
.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.hy-icon-paySuccess {
  color: #19be6b;
  font-size: 160rpx;
  margin-top: 100rpx;
}
.tit {
  font-size: 38upx;
  color: #303133;
  margin-top: 20rpx;
}
.btn-group {
  padding-top: 100rpx;
  display: flex;
  gap: 40rpx;
}
.mix-btn {
  margin-top: 30upx;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 600upx;
  height: 80upx;
  font-size: 36rpx;
  color: #fff;
  border-radius: 10upx;
  &.hollow {
    background: #fff;
    color: #303133;
    border: 1px solid #ccc;
  }
}
</style>
